#ifndef BLEEDTHROUGHEVALQUANTITYPROBA_HPP
#define BLEEDTHROUGHEVALQUANTITYPROBA_HPP

#include <ise/iseQuantificationThresholderOtsu.hpp>
#include <ise/iseQuantificationThresholderOtsu1T.hpp>
#include <ise/iseGrayScaleHistogram.hpp>
#include "GlobalMesureTemplateMethod.hpp"




/**
  * \brief This class Mesure the quantity of bleed through that may appear on the recto image.
  *
  * @todo Formula is wrong
  * Let \f$ I^{verso}_{ink} \f$ be the set of pixel resulting from the ink segmentation of the verso side.
   \f{eqnarray}{
         I^{verso}_{ink} &=& \{ I^{verso} \left( i,j \right) < \mathcal{T} \mid 0<i<W;0<j<H \}
    \f}
   Let \f$ I^{recto}_{ink} \f$ be the set of pixel resulting from the ink segmentation of the recto side.
   \f{eqnarray}{
         I^{recto}_{ink} &=& \{ I^{recto} \left( i,j \right) < \mathcal{T} \mid 0<i<W;0<j<H \}
    \f}

  \f{eqnarray}{
     \stackrel{\mathcal{M}}{QuantityProba} &=& \frac{card \left( I^{verso}_{ink} \setminus card(I^{rerso}_{ink} \right)}
                                                    {card \left( I^{rerso}_{ink} \right)}
  \f}
  *
  *
  *
  */
class EvalBleedThroughVersoQuantity : public GlobalMesureTemplateMethod
{
public:
    EvalBleedThroughVersoQuantity(const girl::tools::Image &verso);
    virtual float evaluate(const girl::tools::Image &image);
    inline virtual int getNbBloc(){return 10;}
    virtual float local(const girl::point &topLeft, const girl::point &bottomRight) {}

    std::string getName()
    {return "QuantityProbable";}

protected :
        const girl::tools::Image &_verso;
        float nbPixelEncreVerso;
};

#endif // BLEEDTHROUGHEVALQUANTITYPROBA_HPP
